package com.example.memurbac_service.dao;

import com.example.memurbac_service.pojo.Ulog;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface UlogMapper
{

    /**
     * 添加操作日志
     */
   @Insert("insert into t_ulog(ulog_createtime,ulog_user,ulog_content) values(now(),#{param1},#{param2})")
   int addlog(String username, String dosomething);



    /**
     * 查询操作日志
     */
    @Select("select * from t_ulog  WHERE ulog_createtime BETWEEN #{param1} and #{param2} order by ulog_createtime desc")
    @Results({
            @Result(property = "id",column = "id"),
            @Result(property = "ulog_createtime",column = "ulog_createtime"),
            @Result(property = "ulog_user",column = "ulog_user"),
            @Result(property = "ulog_content",column = "ulog_content")
    })
    List<Ulog> SelectJourals(Date start, Date end);




}
